A shape measuring device is, for example, an optical measuring device (refer to Patent Literature 1, for example) using a light-section method and including a projection unit configured to project a predetermined pattern such as slit light onto an object to be measured and an image capturing unit configured to capture a pattern image drawn by light projected on a measurement target region. Patent Literature 1 discloses a displacement sensor configured to detect an image included in a set measurement target region in captured and acquired picture image data and to measure displacement of an object to be measured. Patent Literature 1 also discloses that the measurement target region is moved in a displacement measurement direction, following movement of a reference surface.